<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@ taglib prefix='c' uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script src="${ctx }/js/common/page.js" type="text/javascript"></script>
<style>
    .dataTables_info {
        margin-top: 5px;
        margin-bottom: 5px;
        margin-right: 30px;
        height: 30px;
        line-height: 30px;
        float: left;
    }

    .dataTables_paginate {
        margin: 0;
        text-align: right;
        white-space: nowrap
    }
</style>
<!-- <script type="text/javascript">
    $(function () {
        $("#n").val('${result.page.pageSize}');
    })
</script> -->
<div class="page">
    <input type="hidden" value="${result.page.pageIndex }" name="p" id="p">
    <input type="hidden" value="${result.page.totalPage }" id="totalPage">
    <div class="col-md-6 ">
        <!-- <div class="dataTables_length">
            <select class="form-control input-sm" id="n" name="n" onchange="goPage()">
                <option value="8" selected="selected">8</option>
                <option value="10">10</option>
                <option value="20">20</option>
                <option value="30">30</option>
                <option value="50">50</option>
                <option value="100">100</option>
            </select>
        </div> -->
        <div class="dataTables_info">第<span id="span_curPage">${result.page.pageIndex }</span>/<span
                id="span_totalPage">${result.page.totalPage }</span>页共<span
                id="span_totalCount">${result.page.totalCount }</span>条
        </div>
    </div>
    <div class="col-md-6">
        <div>
            <ul class="pagination pull-right">
                <li id="li_first"><a href="javascript:goPage('first')">首页</a></li>
                <li id="li_up"><c:if test="${result.page.pageIndex gt 1}"><a
                        href="javascript:goPage('up')">上一页</a></c:if></li>
                <li id="li_next"><c:if test="${result.page.pageIndex lt result.page.totalPage}"><a
                        href="javascript:goPage('next')">下一页</a></c:if>
                </li>
                <li id="li_last"><a href="javascript:goPage('last')">尾页</a></li>
            </ul>
        </div>
    </div>
</div>
